package org.edu.modules.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import org.edu.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@TableName("sys_log")
@ApiModel(value = "sys_log对象", description = "系统日志信息")
public class SysLog implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty("id")
    private String id;
    @Excel(name = "日志类型", width = 15.0D, dicCode = "log_type")
    @ApiModelProperty("日志类型（1登录日志，2操作日志）")
    @Dict(dicCode = "log_type")
    private Integer logType;
    @Excel(name = "日志内容", width = 15.0D)
    @ApiModelProperty("日志内容")
    private String logContent;
    @Excel(name = "操作类型", width = 15.0D)
    @ApiModelProperty("操作类型:insert=添加，update=更新,delete=删除,status=状态")
    private Integer operateType;
    @Excel(name = "操作用户账号", width = 15.0D)
    @ApiModelProperty("操作用户账号")
    private String userid;
    @Excel(name = "操作用户名称", width = 15.0D)
    @ApiModelProperty("操作用户名称")
    private String username;
    @Excel(name = "ip", width = 15.0D)
    @ApiModelProperty("ip")
    private String ip;
    @Excel(name = "请求java方法", width = 15.0D)
    @ApiModelProperty("请求java方法")
    private String method;
    @Excel(name = "请求路径", width = 15.0D)
    @ApiModelProperty("请求路径")
    private String requestUrl;
    @Excel(name = "请求参数", width = 15.0D)
    @ApiModelProperty("请求参数")
    private String requestParam;
    @Excel(name = "请求类型", width = 15.0D)
    @ApiModelProperty("请求类型")
    private String requestType;
    @Excel(name = "耗时", width = 15.0D)
    @ApiModelProperty("耗时")
    private Integer costTime;
    @Excel(name = "创建人", width = 15.0D)
    @ApiModelProperty("创建人")
    private String createBy;
    @Excel(name = "创建时间", width = 20.0D, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;
    @Excel(name = "更新人", width = 15.0D)
    @ApiModelProperty("更新人")
    private String updateBy;
    @Excel(name = "更新时间", width = 20.0D, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;
    @ApiModelProperty("num=1为统一认证, 2为公共数据, 3为实习....")
    @TableField(exist = false)
    private Integer num;
    @ApiModelProperty("搜素条件开始日期")
    @TableField(exist = false)
    private String beginDate;
    @ApiModelProperty("搜索条件结束日期")
    @TableField(exist = false)
    private String endDate;
    @TableField(exist = false)
    private Integer startIndex;
    @TableField(exist = false)
    private Integer pageSize;
    @TableField(exist = false)
    private String operateTypeName;

}
